<script setup>
import axios from "axios"
import { onMounted, ref } from "vue"
let tat = ref("")
onMounted(() => {
    axios.get("api/js").then(res => {
        tat.value = res.data.data
    })
})
</script>
<template>
    <div class="ay">
    <div class="ldh" v-for="item in tat">
        <div>订单编号：20231102112201</div>
        <div v-for="item in tat" class="lsl">
            <img :src="item.img" alt="">
            <div class="hyh">
                <span>{{ item.name }}</span>
                <div class="shijian">待接单：{{ item.shijian }}</div>
            </div>
            <div class="shu">
                <span>￥{{ item.danjia }}</span>
                <span>x{{ item.geshu }}</span>
            </div>
        </div>
                <div class="psy">
                    <img :src="item.img1" alt="" class="tu1">
                    <div class="name">
                        <div class="ming">
                            <span>{{ item.name1 }}</span>
                            <span>{{ item.ps }}</span>
                        </div>
                        <span>{{ item.ps1 }}</span>
                    </div>
                    <div class="dandan">
                        <img :src="item.img2" alt="" class="tu2">
                        <span>{{ item.cd }}</span>
                    </div>
                    <div class="dandan">
                        <img :src="item.img2" alt="" class="tu2">
                        <span>{{ item.ts }}</span>
                    </div>
                </div>
    </div>
    <div class="ldh" v-for="item in tat">
        <div>订单编号：20231102112201</div>
        <div v-for="item in tat" class="lsl">
            <img :src="item.img" alt="">
            <div class="hyh">
                <span>{{ item.name }}</span>
                <div class="shijian">待接单：{{ item.shijian }}</div>
            </div>
            <div class="shu">
                <span>￥{{ item.danjia }}</span>
                <span>x{{ item.geshu }}</span>
            </div>
        </div>
        <div class="psy">
                    <img :src="item.img1" alt="" class="tu1">
                    <div class="name">
                        <div class="ming">
                            <span>{{ item.name1 }}</span>
                            <span>{{ item.ps2  }}</span>
                        </div>
                        <span>{{ item.ps1}}</span>
                    </div>
                    <div class="dandan">
                        <img :src="item.img2" alt="" class="tu2">
                        <span>{{ item.cd }}</span>
                    </div>
                    <div class="dandan">
                        <img :src="item.img2" alt="" class="tu2">
                        <span>{{ item.ts }}</span>
                    </div>
                </div>
    </div>
</div>
</template>
<style scoped>
.psy{
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.tu1{
    border-radius: 999px;
}
.tu2{
    border-radius: 999px;
}
.name{
    display: flex;
    flex-direction:column;
    gap: 5px;
}
.ming{
    display: flex;
    gap: 5px;
}
.ming span:nth-of-type(2){
    font-size: 12px;
    color: #ccc;
}
.dandan{
    display: flex;
}
.ay{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ldh{
    width: 90%;
    padding: 10px;
    display: flex;
    margin: 20px;
    gap: 10px;
    flex-direction: column;
    background-color: white;
    border-radius: 10px 10px 10px 10px;
}
.lsl{
    display: flex;
    gap: 10px;
}
.hyh {
    display: flex;
    gap: 20px;
    flex-direction: column;
}

.shu {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 50px;
}</style>
